<?php

namespace app\adm\controller;

use think\Controller;

class Base extends Controller
{

	protected function _initialize()
    {
        header("Content-Type:text/html; charset=utf-8");

        if (! config('app_status')) {
            die('no access');
        }
        
        if (! cache('sys_config')) {
            $list = \think\Db::name('config')->column('key,value');
		    cache('sys_config', $list);
        }

        config(cache('sys_config'));

        if (!session('aid')) {
            $this->redirect('login/index');
        }
    }

}
